Google Sign-in
Type
library
Summary
This library provides access to Google Sign-In functionality on Android.
Description
Use this library to allow users to sign in with Google in your Android app, and to retrieve information about the signed-in user's Google account.
Setting up Google Sign-in
A number of steps are required in order to add Google Sign-in functionality to your app. Firstly a Google developer account is needed, which can be created here. Once you have a Google developer account, the next step is to create a new project in the Google API Console. Once your project is created, you can configure the project, specifying the app id you will use for the app as well as adding the SHA1 of your signing certificate. You can find the SHA1 by running
keytool -list -v -alias androiddebugkey -keystore ~.android\debug.keystore
or equivalent in a terminal.
Your app must be signed in order to work with Google Sign-In. You can create a keystore for signing Android apps by following the lesson here
Compatibility and Support
OS
android
Associated Syntax
Handler
| Name | Summary | Syntax |
|---|---|---|
| googleGetSignInDisplayName | Get the display name of the authenticated user | googleGetSignInDisplayName() |
| googleGetSignInId | Get the unique ID for the signed in Google account | googleGetSignInId() |
| googleGetSignInPhotoURL | Get the URL of the profile picture of the authenticated user | googleGetSignInPhotoURL() |
| googleSignIn | Initiate the Google Sign-In process | googleSignIn(<pOptions>) |
| googleGetSignInServerAuthCode | Get an ID token that you can send to your server | googleGetSignInServerAuthCode() |
| googleGetSignInEmail | Get the email address of the authenticated user | googleGetSignInEmail() |
| googleSignInRequired | Find out if a user is already authenticated | googleSignInRequired() |
| googleGetSignInFamilyName | Get the family name of the authenticated user | googleGetSignInFamilyName() |
| googleGetSignInGivenName | Get the given name of the authenticated user | googleGetSignInGivenName() |
| googleSignOut | Logout the currently authenticated user | googleSignOut() |
| googleGetSignInIdToken | Returns an ID token that you can send to your server | googleGetSignInIdToken() |
Message
| Name | Summary | Syntax |
|---|---|---|
| googleSignInResponse | Sent to the caller when the Google Sign-In attempt is complete. | googleSignInResponse <pSuccess> |